package net.lesscoding.shop.remote;

import net.lesscoding.shop.common.Result;
import net.lesscoding.shop.entity.Coupon;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author eleven
 * @date 2024/6/14 9:43
 * @apiNote
 */
@FeignClient(name = "shop-coupon-service")
@RequestMapping("/coupon")
public interface CouponFeignService {

    @GetMapping("/{couponId}")
    Result<Coupon> getById(@PathVariable("couponId") Long couponId);

    @PostMapping("/updateById")
    Result<Boolean> updateById(@RequestBody Coupon coupon);
}
